Makes the whole picture that color AT ONCE, then fades it back to normal over so many frames, without changing room: screen_flash(COLOR_WHITE, 8) is a quick white hit flash. Use it when something is hurt, a lightning bolt strikes or a switch is thrown.
Works differently on Game Boy - The Game Boy has 4 shades, so a screen flash shows the shade closest to the color for a moment: black and white flash exactly, any other color flashes as its grey.
On other consoles this differs: see Side by side and How the consoles differ.
screen_flash(color, frames)| Name | Type |
|---|---|
color | shape_color |
frames | int |
Nothing.
Makes the whole picture one color at once, then fades it back to normal over so many frames, without changing room. screen_flash(COLOR_WHITE, 8) is a quick white hit flash. Use it when something is hurt, lightning strikes, or a switch is thrown.
if (btn_pressed(BTN_B)) {
screen_flash(COLOR_WHITE, 8);
}Pressing B flashes the screen white, and it clears over 8 frames.
frames of 0 or less does nothing you can see.screen_fade, so it shades the backgrounds and the sprites together.One palette fade a frame while it fades, and nothing afterwards.
The color is there on the very frame you call it and fades away in a straight line; 60 frames is about a second, and 6 to 12 reads as a flash. frames of 0 or less does nothing visible. Calling it again before it is over starts a fresh flash. It is the same fade as screen_fade, so it shades the backgrounds and the sprites together.